package com.hzh.page.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author HZH
 * @since 2022-11-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="PageInfo对象", description="")
public class PageInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "文章编号")
      @TableId(value = "page_id", type = IdType.AUTO)
    private Long pageId;

    @ApiModelProperty(value = "文章标题")
    private String title;

    @ApiModelProperty(value = "文章分类编号")
    private Long categoryId;

    @ApiModelProperty(value = "内容")
    private String content;

    @ApiModelProperty(value = "作者编号")
    private Integer authorId;

    @ApiModelProperty(value = "审核状态(0:未审核 1:已审核 2:审核不通过)")
    private Integer auditState;

    @ApiModelProperty(value = "发布状态(0:未发布 1:已发布 2:待发布 3:草稿 4:下架)")
    private Integer publishState;

    @ApiModelProperty(value = "点赞量")
    private Long star;

    @ApiModelProperty(value = "浏览量")
    private Long view;

    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "发布时间")
    private LocalDateTime publishTime;

    @ApiModelProperty(value = "逻辑删除")
    @TableLogic
    private Boolean deleted;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;


}
